<template>
  <div class="tab1_wrap">
    <div class="content_tab">
      <div class="tab_item">
        <div class="title">设备三维图</div>
        <img src="" alt="" />
      </div>
      <div class="tab_item">
        <div class="title">设备健康度</div>
        <div class="echarts_main">
          <pieCharts
            :echartsData="peiChartsData1"
            id="piechart1"
            :width="'220px'"
            :height="'220px'"
            type="1"
          />
        </div>
      </div>
    </div>
    <div class="tab1_table">
      <el-table
        border
        class="jk_common_table003"
        :data="tableData"
        height="style"
        style="width: 100%; height: 100%"
      >
        <el-table-column label="序号" align="center" width="50">
          <template slot-scope="scop">
            {{ scop.$index + 1 }}
          </template>
        </el-table-column>
        <el-table-column
          prop="name"
          label="测点名称"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="desc"
          label="侧点值"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="type"
          label="测点状态"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="time"
          label="诊断时间"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="rule"
          label="诊断规则"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="result"
          label="诊断结果"
          align="center"
        ></el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
import pieCharts from "./pieCharts.vue";

export default {
  data() {
    return {
      tableData: [
        {
          id: "001",
          name: "设备003",
          desc: "11",
          type: "正常",
          time: "22.22.22",
          rule: "服务器规则",
          result: "故障299",
        },
        {
          id: "001",
          name: "设备003-1",
          desc: "11",
          type: "离线",
          time: "22.22.22",
          rule: "系统报警",
          result: "正常",
        },
        {
          id: "001",
          name: "设备003-2",
          desc: "11",
          type: "异常",
          time: "22.22.22",
          rule: "服务器规则1",
          result: "—",
        },
      ],
      tableSelectOptions: [
        {
          value: "与",
          label: "与",
        },
        {
          value: "或",
          label: "或",
        },
        {
          value: "非",
          label: "非",
        },
      ],
      peiChartsData1: {
        value: "40",
        name: "健康度",
      },
    };
  },
  components: {
    pieCharts,
  },
  methods: {
    onEditItemFn(item) {
      console.log(item);
    },
    onDelItemFn(item) {
      console.log(item);
    },
  },
};
</script>
<style lang="scss" scoped>
.tab1_wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #0f2245;

  .content_tab {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 10px;

    .tab_item {
      width: 49%;
      height: 316px;
      background: #122f5a;

      .title {
        font-size: 16px;
        color: #ccc;
        padding: 10px 0 10px 20px;
      }

      img {
        width: 230px;
        height: 230px;
        margin: 0 auto;
        display: block;
      }

      .echarts_main {
        width: 220px;
        height: 220px;
        margin: 0 auto;
      }
    }
  }

  .tab1_table {
    flex: 1 1 auto;
    width: 100%;
    height: 0;

    .table_flag_seclet {
      width: 80px;
      margin: 0 auto;
    }

    .table_caozuo_btns_list {
      display: flex;
      align-items: center;
      justify-content: center;

      .table_caozuo_btn {
        margin-left: 16px;
        color: #387bb6;
        cursor: pointer;

        &:hover {
          text-decoration: underline;
        }

        &:first-child {
          margin-left: 0;
        }
      }
    }
  }
}
</style>
